package com.hgxd.entity.res;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.hgxd.entity.pojo.SysMenu;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * @author wtf
 * @create 2023-10-23 17:11
 * @description : 登录响应类
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "LoginUserVo对象", description = "登录响应类")
public class ResUserVo {
    @ApiModelProperty("角色名称")
    private String roleName;

    @ApiModelProperty("用户id")
    @TableId(value = "user_id", type = IdType.AUTO)
    private Long userId;

    @ApiModelProperty("用户名")
    private String username;

    @ApiModelProperty("密码")
    private String password;

    @ApiModelProperty("姓名")
    private String name;

    @ApiModelProperty("手机号")
    private String phone;

    @ApiModelProperty("头像地址")
    private String headUrl;

    @ApiModelProperty("邮箱")
    private String email;

    @ApiModelProperty("状态  0：禁用   1：正常")
    private Integer status;

    @ApiModelProperty("创建者ID")
    private Long createUserId;

    @ApiModelProperty("其他参数")
    private Map<String,Object> map;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "树型菜单")
    private List<SysMenu> menuList;

    @TableField(exist = false)
    private List<String> role = new ArrayList<>();
    @ApiModelProperty(value = "菜单")
    private List<String> menuListNoTree;

}
